写需求 前端去设置cookie 实现免登录

npm install js-cookie --save

<script>
import Cookie from 'js-cookie'
Cookie.set('key', 'value', { expires: 7, path: '/',domain:'xxxxx',secure:true,samesite:'none' })
Cookie.get('key')

// 底层实现 就是document.cookie
</script>